<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="www.thymeleaf.org">

<head>
    <meta charset="UTF-8">
    <title>登录</title>
</head>
<body>
    <h1>login page</h1>
    <p th:if="${loginError}" style="color: red">用户名获取密码错误</p>
    <form th:action="@{/login}" method="post">
        <label for="username">用户</label>:
        <input id="username" name="username" type="text" autofocus="autofocus"><br>
        <label for="password">密码</label>
        <input id="password" name="password" type="text" ><br>
        <input type="submit" value="登录">
    </form>
    <p><a href="/index" th:href="@{/index}">返回首页</a></p>
</body>
</html>